package com.yyy.dm.listener.order;

import com.yyy.dm.feign.DMSchedulerSeatFeign;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@RabbitListener(queues = "scheduler_seat_transaction")
public class SchedulerSeatListener {

    @Resource
    private DMSchedulerSeatFeign dmSchedulerSeatFeign;

    @RabbitHandler
    public void rollbackSchedulerSeat(String orderNo){
        System.out.println(orderNo);
        dmSchedulerSeatFeign.rollbackSchedulerSeat(orderNo);
    }

}
